package theLibrary;

import Sorts.Books;

import java.util.ArrayList;
import java.util.List;

public class bookSelves {
//    用一个List放书类
    public final List<Books> shu = new ArrayList<Books>();

    public List<Books> getShu() {
        return shu;
    }
//    加几本书
    public void addBooks(List<Books> shu) {
        this.shu.addAll(shu);
    }
//    加一本书
    public void addBook(Books shu) {
        this.shu.add(shu);
    }

    //移除一本书
    public boolean removeBook(Books book) {
        this.shu.remove(book);
        return true;
    }

    //移除所有书
    public List<Books> removeAllBooks() {
        List<Books> shushu = new ArrayList<Books>();
        shu.clear();
        return shushu;
    }
}
